﻿<!-- 汇总计算学生评教-湖南益阳 -->
<template>
    <div>
        <!--<div class="btn-add">
            <button type="button" class="btn btn-success btn-lg" @click="shtkmodel()"><i class="iconfont icon-chenggong ft12 mr5"></i>审核调课</button>
            <button type="button" class="btn btn-danger btn-lg" @click="deltk()"><i class="iconfont icon-shanchu ft12 mr5"></i>删除调课记录</button>

        </div>-->

        <div class="row" style="height:40px;margin:10px">

            <div class="col-xs-3 padding20" style="padding-bottom:10px">
                <div class="input-group" style="margin-bottom:10PX;">
                    <div class="input-group-btn">
                        <button type="button" style="height: 34px;min-width:80PX" class="btn btn-primary  dropdown-toggle">学期</button>
                    </div>
                    <base-xq :pzoption="query.xq" isnow></base-xq>

                </div>
            </div>
            <div class="col-xs-3 padding20" style="padding-bottom:10px">
                <div class="input-group" style="margin-bottom:10PX;">
                    <div class="input-group-btn">
                        <button type="button" style="height: 34px;min-width:80PX" class="btn btn-primary  dropdown-toggle">班级系部</button>
                    </div>
                    <base-xb :pzoption="query.xb" isqx isdx isjx></base-xb>

                </div>
            </div>



        </div>
        <div class="row" style="margin:10px">

            <div class="col-xs-12 padding20" style="padding-bottom:5px">
                <el-tabs type="card">
                    <el-tab-pane>
                        <span slot="label"><i class="el-icon-s-goods"></i>学生评教记录</span>
                        <el-row :gutter="20">
                            <el-col :span="24" style="text-align:right">

                            </el-col>
                        </el-row>
                        <base-table :pzoption="tableop" @selection-change="handleSelectionChange">
                        </base-table>
                    </el-tab-pane>
                    <el-tab-pane>
                        <span slot="label"><i class="el-icon-s-custom"></i>评教汇总</span>
                        <el-row :gutter="20">
                            <el-col :span="24" style="text-align:right">
                                <el-button @click="jshz()" size="medium" type="success">计算汇总结果</el-button>
                            </el-col>
                        </el-row>
                        <base-table :pzoption="tableop1" @selection-change="handleSelectionChange1">
                        </base-table>
                    </el-tab-pane>

                </el-tabs>
            </div>

        </div>




        <!-- 表格 -->



    </div>
</template>

<script>
    module.exports = {
        props: ['pdata'],
        components: {
            'base-table': httpVueLoader('/ViewV5/Base/Vue/Table.vue'),
            'base-xq': httpVueLoader('/ViewV5/AppPage/QJJW/component/conxq.vue'),
            'base-xb': httpVueLoader('/ViewV5/AppPage/QJJW/component/conxb.vue?v=2')
        },
        data: function () {
            return {
                search: "",
                kcdm: "",
                jssl: 0,
                shzt: 0,
                shyj: "",
                shztdk: 0,
                shyjdk: "",
                jcdataset: [],
                query: {
                    zc: "1",
                    shzt: "0",
                    xq: { value: "" },
                    xb: { value: [] },
                },
                js: { value: "" },
                alldata: [],
                seljc: { jcmc: "", isbn: "" },
                tableop: {
                    title: "学生评教明细",
                    issel: true,
                    iscz: false,
                    height: 500,
                    isxh: true,
                    dataset: [],
                    loading: true,
                    multipleSelection: [],
                    collist: [
                        { colid: "xq", colname: "学期", isshow: true, istip: false },
                        { colid: "XBMC", colname: "系部名称", isshow: true, istip: false },
                        { colid: "bh", colname: "班号", isshow: false, istip: true, nosort: true },
                        { colid: "bj", colname: "班级", isshow: true, istip: true, nosort: true },
                        { colid: "xh", colname: "学号", isshow: true, istip: true },
                        { colid: "xm", colname: "姓名", isshow: true, istip: true, nosort: true },
                        { colid: "jsmc", colname: "上课教师", isshow: true, istip: true },
                        { colid: "jsdm", colname: "教师代码", isshow: false, istip: true, nosort: true },
                        { colid: "kcdm", colname: "课程代码", isshow: false, istip: true },
                        { colid: "pjkcmc", colname: "课程名称", isshow: true, istip: false },
                        { colid: "zf", colname: "评分", isshow: true, istip: true, nosort: true },
                        { colid: "pjtime", colname: "评教时间", isshow: true, istip: true, nosort: true },
                    ]
                },
                tableop1: {
                    title: "学生评教汇总统计",
                    issel: true,
                    iscz: false,
                    height: 500,
                    isxh: true,
                    dataset: [],
                    loading: true,
                    multipleSelection: [],
                    collist: [
                        { colid: "xq", colname: "学期", isshow: true, istip: true },
                        { colid: "XBMC", colname: "系部名称", isshow: true, istip: true },
                        { colid: "bh", colname: "班号", isshow: false, istip: true, nosort: true },
                        { colid: "bj", colname: "班级", isshow: true, istip: true },
                        { colid: "jsdm", colname: "教师代码", isshow: true, istip: true },
                        { colid: "pjrc", colname: "班级排名", isshow: true, istip: true, nosort: true },
                        { colid: "zhdf", colname: "折算得分", isshow: true, istip: true, nosort: true },
                        { colid: "pjdf", colname: "总评测分", isshow: true, istip: true, nosort: true },


                    ]
                }
            }
        },
        methods: {
            handleSelectionChange(val) {
                this.tableop.multipleSelection = val;
            },
            handleSelectionChange1(val) {
                this.tableop1.multipleSelection = val;
            },
            jshz: function () {

            },
            querydata: function () {
                var pro = this;
                pro.tableop.loading = true;
                pro.tableop1.loading = true;

                $.getJSON('/API/VIEWAPI.ashx?Action=ZLPJ_GETXSPJ', { P1: pro.query.xq.value, P2: pro.query.xb.value.join() }, function (resultData) {
                    if (!resultData.ErrorMsg) {
                        pro.tableop.dataset = resultData.Result;
                        pro.tableop1.dataset = resultData.Result1;

                        pro.tableop.loading = false;
                        pro.tableop1.loading = false;

                    }
                })
            },
            InitWigetData: function () {
                this.querydata();
            },
        },
        watch: {
            'query': { //深度监听，可监听到对象、数组的变化
                handler(newV, oldV) {
                    var chi = this;
                    if (newV && chi.query.xb.value.join()) {
                        chi.querydata();
                    }
                },
                deep: true
            }
        },
        mounted: function () {
            var pro = this;
            pro.$nextTick(function () {
                //pro.InitWigetData();
            })

        }
    };
</script>